#!/bin/bash
# Any question, please contact homer.xing@gmail.com
# Install softwares to transfer programs from computer to AT91SAM9263

# After running 'sudo ~/connect', computer can connect to 9263 with HL-340 line.
sudo cp connect9263 /usr/local/bin/
# From ATMEL main site
unzip sam-ba_cdc_2.8.linux_01.zip -q
sudo cp sam-ba_cdc_2.8.linux_01 /usr/local/ -r
sudo chmod a+x /usr/local/sam-ba_cdc_2.8.linux_01/sam-ba_cdc_2.8.linux_01
# use minicom to login to 9263
sudo apt-get install minicom -y
cp minirc.dfl ~/.minirc.dfl
# use kermit to login to 9263
sudo apt-get install ckermit -y
cp kermrc ~/.kermrc
# enable nfs
sudo apt-get install nfs-kernel-server -y
# change it by yourself
# echo '/rootfs 192.168.0.0/24(rw,sync,no_root_squash,no_subtree_check)'>/etc/exports
sudo /etc/init.d/nfs-kernel-server restart
showmount -e 127.0.0.1
sudo apt-get install tftp tftpd
# change it by yourself
# echo "tftpd dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s $HOME/maxwit/images">/etc/inetd.conf
